<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<c:set var="ctx" value="${pageContext.servletContext.contextPath}"/>

<!Doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <%--<link href="${ctx}/resources/inter/css/login_style.css" rel="stylesheet"/>--%>
    <link rel="shortcut icon" type="image/png" href="${ctx}/favicon.png"/>

    <link rel="stylesheet" href="${ctx}/resources/assets/css/common.css">
    <link rel="stylesheet" href="${ctx}/resources/assets/css/login-page.css">
    <link rel="stylesheet" href="${ctx}/resources/assets/css/animate.css/animate.css">
    <title>世外云</title>
</head>
<body>

<div id="wrap">
    <!--商户-->
    <div class="header">
        <div class="header-logo">
            <img src="${ctx}/resources/assets/images/logo-3.png">
            <p class="header-logo-merchant">世外云</p>
            <div class="header-list">
                <a href="<%=basePath %>/oauth2/platform">
                    <img src="${ctx}/resources/assets/images/list.png">
                    <p>云平台列表</p>
                </a>
            </div>
        </div>
    </div>
    <div class="animated fadeInRight container">
        <div class="container-${clientDetail.scope}">
            <div class="container-title">
                <img src="${ctx}${clientDetail.icon}">
                <p><b>${clientDetail.clientName}</b></p>
                <input id="client" type="hidden" value="${clientDetail.clientId}"/>
            </div>
            <form id="loginForm" action="" method="post">
                <input type="text" placeholder="用户名" class="container-username" name="account" id="account">
                <input type="password" placeholder="密码" class="container-password" name="password" id="password">
                <input type="text" placeholder="验证码" class="container-verification">
                <canvas id="code" class="container-code" name="code">
                    <img src="<%=basePath %>/mi/login/verify/code.json" title='点击换一张试试' onclick='changeCode()'
                         id="verificationCode"/>

                </canvas>
                <button class="container-signIn merchant" id="loginBtn">登录</button>
            </form>
        </div>
    </div>
</div>
<div class="footer">
    <div>
        <!--p class="footer-company">成都视外云科技有限公司版权所有</p-->
        <p class="footer-copy">Copyright©2017 蜀ICP备17002650号</p>
    </div>
</div>

<script src="${ctx}/resources/assets/js/jquery.js"></script>
<script src="${ctx}/resources/assets/js/common.js"></script>
<script src="${ctx}/resources/assets/js/login-page.js"></script>
<script src="${ctx}/resources/assets/layer/layer.js"></script>


<%--<script src="${ctx}/resources/jquery.min.js"></script>--%>
<%--<script src="${ctx}/resources/inter/js/login.js"></script>--%>
<%--<script src="${ctx}/resources/inter/js/utils.js"></script>--%>
<%--<script src="${ctx}/resources/inter/js/loading.js"></script>--%>
<%--<script src="${ctx}/resources/inter/js/httpHelper.js"></script>--%>
<%--<script src="${ctx}/resources/layer/layer.js"></script>--%>

<script type="text/javascript">


    function changeCode() {
        var verificationCode = document.getElementById('verificationCode');
        var now = new Date();
        verificationCode.src = "<%=basePath %>/mi/login/verify/code.json?date" + now;
    }

    <c:if test="${oauth_login_error}">
    layer.msg("用户名或密码错误", {shift: 6});
    </c:if>
    <c:if test="${oauth_login_error != true && third_error != null && third_error != ''}">
    layer.msg('${third_error}', {shift: 6});
    </c:if>
</script>
</body>
</html>